//公告字符校验类
package com.jrtc.common;



public final class StringHelper {
	public static boolean isNotEmpty(String string) {
		return string != null && string.length() > 0 && !string.equals("null");
	}
	public static boolean isEmpty(String string) {
		return string == null || string.length() == 0 || string.equals("null");
	}

	public static boolean isEmptyByTrim(String string) {
		return string == null || string.trim().length() == 0;
	}

	public static boolean isEmpty(Object obj) {
		return obj == null || obj.toString().length() == 0 || obj.toString().equals("null");
	}

	public static boolean isEmptySpecial(String string) {
		return string == null || string.length() == 0 || string.equals("0");
	}

	public static String qualify(String prefix, String name) {
		if (name == null || prefix == null) {
			throw new NullPointerException();
		}
		return new StringBuffer(prefix.length() + name.length() + 1).append(prefix).append('.').append(name).toString();
	}
}
